package com.rawchen.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rawchen.entity.Tag;
import com.rawchen.model.vo.TagBlogCount;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description: 博客标签持久层接口
 */
@Mapper
@Repository
public interface TagMapper extends BaseMapper<Tag> {
	/**
	 * 获取所有标签List不查询id
	 */
	List<Tag> getTagListNotId();

	/**
	 * 查询给定博客含有的标签list
	 *
	 * @param blogId 博客ID
	 */
	List<Tag> getTagListByBlogId(Long blogId);

	List<TagBlogCount> getTagBlogCount();
}
